1. Field of the Invention
The present invention relates to a digital receiver and more particularly to an apparatus for converting the size of an input image in compliance with an output format of a digital TV.
2. Discussion of Related Art
A digital TV receives images of various types and sizes. Thus, a digital TV requires a format converter which converts the type and size of images in compliance with the format of the display device. Particularly when the input video format is of a high definition grade but the display format is of a standard definition grade, a vertical and horizontal filtering is required. For example, when the input video format has 1,920 pixelsxc3x971,080 lines and the display format has 720 pixelsxc3x97480 lines, the input video must be filtered in the vertical and horizontal directions.
FIG. 1 is a block diagram of a digital receiving system in the related art including a format converter. Referring to FIG. 1, a tuner 102 selects a channel from a plurality of channels received through an antenna 101 and outputs the selected channel to a demultiplexer 103. The demultiplexer 103 selects a desired program from a plurality of programs included in the channel and divides the selected program into audio and video bit stream packets. The divided video bit stream is output to a video decoder 104, which removes the overhead (header information, start code, etc.) from the video bit stream and variable-length-decodes the data information. The video decoder 104 also inverse quantizes, inverse discrete cosine transforms and using motion vectors for the decoded data information, motion compensates the data information to restore the pixel values of the original picture. The restored picture is then output to a format converter 105. The format converter 105 converts the input video format to conform to the display format if the two formats are different, and outputs the received picture for display.
FIG. 2 is a block diagram of a format converter for performing video format conversion in the vertical direction. The input video data is received through an input buffer 201 and stored in the first line memory of a memory 202. One line memory is capable of storing the amount of data corresponding to one line of input video data, and the number of line memories of memory 202 is equal to the number of taps in a filter 206. The line memories of memory 202 have a first-in-first-out (FIFO) structure. Thus, when data is read, the previous data is output from a line memory and input to the next line memory. The vertical format conversion for the video data will be explained below.
One address of a line memory may store data by one byte or by eight bytes. If the data is stored by eight bytes, a P2S unit 203 is required to convert the eight-byte data into a byte unit which can be filtered by the filter 206. Each P2S of P2S unit 203 is a kind of multiplexer that converts the data of eight bytes output in parallel from each line memory into data of one byte. The one-byte data which passed through the P2S unit 203 enters the filter 206. The filter 206 multiplies the input video data items {I0, I1, . . . , In} by filter coefficients {C0, C1, . . . , Cn}, respectively, and adds the multiplied data items, as represented by Equation (1) below, where n is an odd number.
OUT=(I0xc3x97C0)+(I1xc3x97C1)+, . . . ,+(Icenterxc3x97Ccenter)+, . . . ,+(Inxc3x97Cn)xe2x80x83xe2x80x83(1)
The coefficients of the filter 206 are previously stored in a filter coefficient table 204. Accordingly, the coefficients required for a current format conversion are selected under the control of a controller 200, and are loaded on the filter 206 through a buffer 205. For example, when the filter 205 has five taps, five line memories of memory 202 are required.
Referring to FIG. 3Axcx9c3C, when the input video data items are vertically decimated by half, data items {D2, D4, D6, . . . } become the input center values (Icenter) of filter 206. Also, the data items corresponding to lines D0xcx9cD4 are stored sequentially from the lowest line memory due to the line shift of the input data, as shown in FIG. 3B, and are output to the filter 206. The locations of the input center values (Icenter) and the coefficient center value (Ccenter) of filter 206 are fixed. Particularly, the coefficient center value and the input center values must be input respectively through the Ccenter and Icenter at all times. Moreover, the filter coefficients are symmetrical with respect to the Ccenter. Accordingly, the center value of input data item D2 is input into Icenter of filter 206 to be multiplied by the coefficient center value C2.
Typically, the coefficient center value Ccenter is given 20 the largest value among the coefficient values input into the filter 206. FIG. 3B shows an example in which the coefficient center value C2 is 0.4, the coefficient values C1 and C3 on either sides of coefficient center value C2 is 0.2, and the outermost coefficient values C1 and C4 is 0.1. Thus, the filter coefficient serves as a kind of weight and the output of the filter 206 becomes as follows.
OUT=D0C0+D1C1+D2C2+D3C3+D4C4=0.1D0+0.2D1+0.4D2+0.3D3+0.1D4.
As the data items corresponding to lines D0xcx9cD4 are output to the filter 206, the data items corresponding to lines D2xcx9cD6 are stored sequentially from the lowest line memory of memory 202, as shown in FIG. 3C, and are output to filter 206. The center value of the input data item D4 is input into Icenter of filter 206 to be multiplied by the coefficient center value C2 (=0.4). Thus, the output of filter 206 becomes 0.1D2+0.2D3+0.4D4+0.2D5+0.1D6. According to the aforementioned process, the number of lines of the video data output from the input buffer 201 is reduced by half as they pass through the filter 206.
A line memory 207 connected to the output port of the filter 206 is used when the output video data is extracted between lines of video, i.e. when interpolation is needed. For example, if 1080 lines are converted into 480 lines, the filter 206 first converts the 1080 lines into 540 lines through the xc2xd down-filtering. Thereafter, the 540 lines are converted into 480 lines by interpolation because 540 is not a multiple of 480. Thus, when interpolation is required, the filtered result of the first video line is stored in the line memory 207 until the filtered result of the second video line is output from the filter 206. An interpolation unit 208 then interpolates the filtered result of the first line stored in line memory 207 and the filtered result of the second video line output by the filter 206.
In other words, the video data that was filtered by the filter 206 is either stored in the line memory 207 according to the format conversion and be interpolated with the filtered result of the next video line data, or output without interpolation by bypassing the line memory 207.
As shown in FIG. 4, for example, when the output data must be extracted from a position (1) between video data items D3 and D4, i.e. the middle of the two lines D3 and D4, the video data items D1xcx9cD5 are first filtered by filter 206 and stored in the line memory 207. The filtered result of the video data items D1xcx9cD5 is represented by Equation (2) below.
OUT (D1xcx9cD5)=D1C0+D2C1+D3C2+D4C3+D5C4xe2x80x83xe2x80x83(2)
Thereafter, the filter 206 filters video data items D2xcx9cD6 and outputs the filtered result to the interpolation unit 207. The filtered result of video data items D2xcx9cD6 is represented by the Equation (3) below.
xe2x80x83OUT (D2xcx9cD6)=D2C0+D3C1+D4C2+D5C3+D6C4xe2x80x83xe2x80x83(3)
The interpolation unit 208 receives the filtered result of data D1xcx9cD5 stored in the line memory 207 and the filtered result of data D2xcx9cD6 output directly from the filter 206, and interpolates the two filtered results, which can be represented by Equation (4).
OUT=[Equation (2)+Equation (3)]/2=[(D1C0+D2C1+D3C2+D4C3+D5C4)+(D2C0+D3C1+D4C2+D5C3+D6C4)]/2xe2x80x83xe2x80x83(4)
Particularly, Equation (2) is the filtered result using D3 as the center value and Equation (3) is the filtered result using D4 as the center value. Also, C2 becomes the filter coefficient center value while the other coefficients are symmetrical with respect to C2 as the center. The value obtained in the interpolation unit 208 by adding the result of Equation (2) to the result of Equation (3) and averaging the sum becomes the desired output data.
However, when the desired output data is located at a position (2) between D3 and D4, as shown in FIG. 4, and not at the middle of the D3 and D4, the interpolation unit 208 assigns weights xe2x80x983xe2x80x99 to Equation (2) and xe2x80x981xe2x80x99 to Equation (3), and obtains a weighted average by multiplying the sum with xc2xc. This can be represented by Equation (5).
xe2x80x83OUT=[3Equation (2)+Equation (3)]/4=[3(D1C0+D2C1+D3C2+D4C3+D5C4)+(D2C0+D3C1+D4C2+D5C3+D6C4)]/4xe2x80x83xe2x80x83(5)
In the conventional vertical video format converter of FIG. 2 as described above, the locations of the input center value Icenter and the coefficient center value Ccenter of filter 206 are fixed. Thus, the coefficient center value and the input video data center value must be input respectively through the Ccenter and Icenter, at all times. This restricts the filter coefficients to achieve symmetry with respect to the Ccenter as the center. Accordingly, the format conversion in various modes become difficult because of the restriction. Moreover, a line memory and an interpolation unit must be connected to the output port of the filter when interpolation is required.
Accordingly, an object of the present invention is to solve at least the problems and disadvantages of the related art.
An object of the present invention is to provide a vertical video format converter for supporting format conversion in various modes.
Another object of the present invention is to provide a vertical video format converter in which the center positions of input data items and the coefficients of a filter are not fixed.
A still another object of the present invention is to provide a vertical video format converter in which a filter directly interpolates the input video data.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objects and advantages of the invention may be realized and attained as particularly pointed out in the appended claims.
To achieve the objects and in accordance with the purposes of the invention, as embodied and broadly described herein, a vertical video format converter includes a memory unit which consists of a plurality of line memories and stores input video data in one of the line memories; a filter for multiplying the video data items respectively output from the line memories by coefficients input into corresponding video data item positions, and adding the multiplied results; a filter coefficient table for previously calculating filter coefficients which vary with format conversion rates and storing the calculated values; a switch for moving the position of a filter coefficient selected from the filter coefficient table according to a format conversion rate in compliance with the center position of the video data input into the filter; and a controller for controlling the storing of data in the line memories and switching in the switch.
In a preferred embodiment of the present invention, the controller generates a control signal which indicates the line memory storing the center data item of the input video data currently being processed, and the switch moves the position of the filter coefficient output to the filter according to the control signal. The filter performs filtering for the first and second line data items to simultaneously carry out interpolation. Furthermore, the vertical video format converter of the present invention may be implemented in any digital receiving system requiring a format conversion.